<div class="middle-box-profile">
    <div class="div_bg_top">
        <div class="bg_top">
        	
            <div class="div_tab">
                <{include file="$SMARTY_LAYOUT_PATH/User/Submenu.tpl"}>
                <div style="position:relative;margin-top:-8px;" class="profile-shadow"></div>
            </div>
            <div style="padding-bottom:0;top:21px; position:relative;" class="profile-info">
                <a id="dImgProfile" href="javascript:void(0);"></a><a href=""><img width="68" height="68" src="<{$userEntity->getImage()}>" id="avatarMain"></a>
                <a name="" href="javascript:void(0);"><em id="bNameUser"><{$fullname }></em></a>
            </div>
        </div>
    </div>
    <form method="post" action="<{$APPLICATION_URL}>/User/Index/personal"  id="frmPersonal" enctype="multipart/form-data">
    <div style="padding-top:0" class="box-profile">
        <div class="middle-box-content personal">
            <p>Email</p>
            <div class="div_txtDK big-txt">
                <input disabled="disabled" type="text" value="<{ $email }>" style="width: 357px;"  id="txtMyEmail" name="txtMyEmail">
            </div>
            <p>Tên thành viên</p>
            <div class="div_txtDK big-txt">
                <input   type="text"  value="<{ $fullname }>" style="width: 357px;" id="txtFullname" name="txtFullname">
            </div>
            <a style="display:none" class="change" id="aThayDoi" href="javascript:void(0);">Thay đổi</a>
            <p>Giới tính <span class="red">*</span></p>
           	<div style="margin-right:20px;" class="div_txtDK big-txt ">
             <select style="width:78px;" autocomplete="off" id="ddlDate" name="gender">
				<option value="male" <{if $gender=="male" }> selected <{/if}>>Nam</option>
                <option value="female" <{if $gender=="female" }> selected <{/if}>>Nữ</option>
				</select>
			 </div>
            <p>Ngày sinh<span class="red">*</span></p>
            <div class="middle-box-date">
				<div class="div_txtDK big-txt">
                    <input readonly="readonly"  class="date" type="text" value="<{ $birthday }>" style="width: 201px;" id="txtBirthday" name="txtBirthday">
                </div>
                <div class="clear"></div>
            </div>
            <p class="middle-box-checkbox"><span><input type="checkbox" id="cbNote" name="cbNote"></span><span class="middle-box-text">Thay đổi mật khẩu</span></p>
            <p>Mật khẩu hiện tại<span class="red">*</span></p>
            <div>
                <div class="div_txtDK big-txt">
                    <input type="password" style="width: 201px;" id="txtMyPass" name="txtMyPass">
                </div>
                <div class="clear"></div>
                <div class="div_pass">
                    <p>Mật khẩu mới<span class="red">*</span></p>
                    <div class="div_txtDK big-txt">
                        <input type="password" style="width: 201px;" id="txtMyNewPass" name="txtMyNewPass">
                    </div>
                </div>
                <div class="floatright">
                    <p>Xác nhận mật khẩu mới<span class="red">*</span></p>
                    <div class="div_txtDK big-txt">
                        <input type="password" style="width: 201px;" name="txtMyReNewPass" id="txtMyReNewPass">
                    </div>
                </div>
            </div>
            <!--<em class="btn-line"></em>-->
            <p class="middle-box-button">
                <input type="hidden" value="submit" name="asubmit">
                <a type="submit" class="save_button_vn" id="btnSave" href="javascript:void(0);" onclick =""></a>  
                <a type="reset" class="cancel_button_vn" id="btnReset"></a> 
            
            </p>
            <p class="middle-box-require"><span class="red">*</span><span class="lost-pass">thông tin bắt buộc</span></p>
        	
        </div>
    </div>
    </form>
</div>
<script type="text/javascript">
$(document).ready(function() {
	$("#liThongTinCN").addClass('active');
});


$(document).ready(function(){
	
	$('#btnSave').click(function(){
		var msg='';
		//to do require
		if ($('#txtFullname').val()==''){
			msg+='<span>Ten không được bỏ trống</span>';
		}
		//do checked
		if (msg!=''){
			$('html, body').animate({ scrollTop: 0 }, 'slow');
			setTimeout(function(){
				$('#pError p').html('<span class="pop-up-img"></span>' + msg);
				$('#pError').slideDown(200);
			}, 500);
			
			return false;
		}
		$('#frmPersonal').submit();
	});
	$('.date').datepicker({dateFormat: 'yy-mm-dd'});
 // $(".date").date_input();
});
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();

$('.date').datepicker({
	constrainInput: true,
	dateFormat: 'yy-mm-dd',
    maxDate: new Date(currentYear, currentMonth, currentDate)
});
</script>